package ooday02;

public class Animal {
     String name;
     int age;
     String colour;

     String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColour() {
        return colour;
    }

    public void setColour(String colour) {
        this.colour = colour;
    }


       Animal(String name,int age,String colour){
       this.name=name;
       this.age=age;
       this.colour=colour;

   }
   void drink(){
        System.out.println(colour+"色的"+age+"岁的"+name+"在喝水");
   }
    void eat(){
       System.out.println(colour+"色的"+age+"岁的"+name+"在吃饭");
    }


}
class Dog extends Animal{
    Dog(String name,int age,String colour){
        super(name, age, colour);

   }
    void lookHome(){
       System.out.println(colour+"色"+age+"岁的小狗"+name+"在看家");
   }
   void drink() {
        System.out.println(colour + "色的" + age + "岁的" + name + "在喝水");
    }
    void eat(){
        System.out.println(colour+"色"+age+"岁的小狗"+name+"在吃骨头");
    }

}



class Chick extends Animal{

    Chick(String name,int age,String colour) {
        super(name, age, colour);
    }

    void layEaas(){
        System.out.println(colour + "色的" + age + "岁的小鸡" + name +"它正在下蛋");
    }
    void drink() {
        System.out.println(colour + "色的" + age + "岁的" + name + "在喝水");
    }
    void eat(){
        System.out.println(colour + "色的" + age + "岁的小鸡" + name + "它正在吃米");
    }
}



class Fish extends Animal{
    Fish(String name,int age,String colour){
        super(name, age, colour);
    }
    void drink() {
        System.out.println(colour + "色的" + age + "岁的" + name + "在喝水");
    }
    void eat(){
        System.out.println(colour + "色的" + age + "岁的小鱼" + name+"它正在吃虾");
    }

}